package org.finesys.common.security.client.core.constants;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

@AllArgsConstructor
public enum GiteeScopeEnum {

    USER_INFO("user_info"),

    PROJECTS("projects"),

    PULL_REQUESTS("pull_requests"),

    ISSUES("issues"),

    NOTES("notes"),

    KEYS("keys"),

    HOOK("hook"),

    GROUPS("groups"),

    GISTS("gists"),

    ENTERPRISES("enterprises");

    @Getter
    private final String value;

    public static List<String> legalScope() {
        return Arrays.stream(values()).map(GiteeScopeEnum::getValue).collect(Collectors.toList());
    }
}
